package domin;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;


@NoArgsConstructor
@Getter
@Setter
@Slf4j
public class PersonalBorrowingInformation
        implements Comparable<PersonalBorrowingInformation>, Serializable {
    private Integer id;
    private String name;
    private String borrowingBook;
    private Integer remainingBorrowingTime;
    private String tips;


    public PersonalBorrowingInformation(Integer id,String name, String borrowingBook,Integer remainingBorrowingTime, String tips) {
        this.id=id;
        this.name=name;
        this.borrowingBook=borrowingBook;
        this.remainingBorrowingTime=remainingBorrowingTime;
        this.tips=tips;
    }

    @Override
    public int compareTo(PersonalBorrowingInformation o) {
        // TODO Auto-generated method stub
        return this.id - o.id;
    }

    public String toString()
    {
        final String TAB = "    ";

        String retValue = "";

        retValue = "Title ( "
                + super.toString() + TAB
                + "id = " + this.id + TAB
                + "name = " + this.name + TAB
                + "borrowingBook = " + this.borrowingBook + TAB
                + "remainingBorrowingTime = " + this.remainingBorrowingTime + TAB
                + "tips = " + this.tips + TAB
                + " )";

        return retValue;
    }
}
